<template>
	<view>
		<view class="locality">
			<view class="title">简历投递</view>
		</view>
		<!-- tab -->
		<view class="menu-block">
			<block
				v-for="(item, index) in citytab"
				:key="index">
				<view
					:class="{ activetext: index == num }"
					@click="menubtn(index,item.name)">
					{{ item.name }}
				</view>
			</block>
		</view>
		
		
		
	</view>
</template>

<script>
	export default {
		name: 'local',
		data() {
			return {
				num: 0,
				citytab: [
					{
						name: '全部'
					},
					{
						name: 'java工程师'
					},
					{
						name: '软件测试'
					},
					{
						name: '前端开发'
					}
					
				]
			}
		},

		methods: {
			menubtn(index,name){
				// console.log(index)
				// console.log(name)
				this.num=index
				//用子组件调用父组件的方法
				this.$parent.fatherMethod(name)
			}
		}
	}
</script>

<style scoped>
	.locality {
		margin: 0 20upx;
	}
	.title {
		color: #292c33;
		font-size: 50upx;
	}
	.activetext {
		color: #4cd964;
		background: #00aaff !important;
		border: 1px solid #00aaff !important;
	}
	.menu-block view {
		background: #fffffff;
		border: 1px solid #c2c5cc;
		border-radius: 6upx;
		font-size: 25upx;
		color: #292c33;
		font-weight: bold;
		text-align: center;
		padding: 15upx;
		margin: 20upx;
	}
	.menu-block {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		flex-wrap: wrap;
	}
</style>
